package cool.mtc.minghe.service.service.sys.dict;

import cool.mtc.core.page.PageData;
import cool.mtc.minghe.data.entity.sys.dict.DictDO;
import cool.mtc.minghe.data.model.base.Dict;
import cool.mtc.minghe.data.model.sys.dict.dto.DictDTO;
import cool.mtc.minghe.data.model.sys.dict.dto.DictListDTO;
import cool.mtc.minghe.data.model.sys.dict.form.DictForm;
import cool.mtc.minghe.data.model.sys.dict.query.DictQuery;
import cool.mtc.minghe.service.service.BaseService;

import java.util.List;
import java.util.Map;

/**
 * @author 明河
 */
public interface DictService extends BaseService {

    long insert(DictForm form);

    void update(DictForm form);

    void delete(Long id);

    PageData<DictListDTO> pageList(DictQuery query);

    DictDTO info(Long id);

    Map<String, List<Dict>> dictListByDictTypeCodes(List<String> dictTypeCodes);

    List<Dict> dictListByDictTypeCode(String dictTypeCode);

    Map<String, List<Dict>> dictListByDictTypeIds(List<String> dictTypeIds);

    void saveWithUpdate(List<DictDO> dictList);

    Long getIdByDictTypeCodeAndCode(String dictTypeCode, String code);
}
